// 导入组件
import Layout from "@/pages/Layout";
import Login from "@/pages/Login";
import Home from "@/pages/Home";

// 导入路由配置
import { createBrowserRouter } from "react-router-dom";

//创建实列
const router = createBrowserRouter([
  {
    path: "/",
    element: <Layout />,
    // 子路由
    children: [
      {
        path: "home",
        element: <Home />,
      },
    ],
  },
  // 登录页面
  {
    path: "/login",
    element: <Login />,
  },
]);

export default router;
